package com.nondo.rdp.finance.service;


import java.util.Map;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.nondo.rdp.auth.endpoint.model.Query;
import com.nondo.rdp.core.model.View;
import com.nondo.rdp.finance.service.impl.MarketServiceHystric;

@FeignClient(value = "rdp-stock", fallbackFactory=MarketServiceHystric.class)
public interface MarketService {

    /**
     * 行情
     */
    @RequestMapping(value = "/api/stock/market/index", method = RequestMethod.POST)
    View<Map<String, Object>> marketIndex();

    @RequestMapping(value = "/api/stock/market/list/updown", method = RequestMethod.POST)
    View marketListUpdown(@RequestBody Map<String, Object> asharesBean);

    @RequestMapping(value = "/api/stock/market/info", produces = "application/json", consumes = "application/json")
    View<Map<String, Object>> marketInfo(@RequestBody Map<String, Object> marketBean);

    @RequestMapping(value = "/api/stock/market/trend", method = RequestMethod.POST)
    View<Map<String, Object>> marketTrend(@RequestBody Map<String, Object> marketBean);

    @RequestMapping(value = "/api/stock/market/kline", method = RequestMethod.POST)
    View<Map<String, Object>> marketKline(@RequestBody Map<String, Object> marketBean);

    @RequestMapping(value = "/api/stock/market/real", method = RequestMethod.POST)
    View<Map<String, Object>> marketReal(@RequestBody Map<String, Object> marketBean);
    
    @RequestMapping(value = "/api/stock/market/concept/updown", method = RequestMethod.POST)
    View marketConceptListUpdown(@RequestBody Map<String, Object> asharesBean);

    /**
     * 模拟炒股
     */
    @RequestMapping(value = "/api/stock/simulate/index", method = RequestMethod.POST)
    View<Map<String, Object>> simulateIndex(@RequestBody Query<Map<String, Object>> query);

    @RequestMapping(value = "/api/stock/simulate/list/buy", method = RequestMethod.POST)
    View<Map<String, Object>> simulateListbuy(@RequestBody Query<Map<String, Object>> query);

    @RequestMapping(value = "/api/stock/simulate/buy", method = RequestMethod.POST)
    View simulateBuy(@RequestBody Map<String, Object> simulateBuyBean);

    @RequestMapping(value = "/api/stock/simulate/sale", method = RequestMethod.POST)
    View simulateSale(@RequestBody Map<String, Object> simulateBuyBean);

    @RequestMapping(value = "/api/stock/simulate/log/list/today", method = RequestMethod.POST)
    View<Map<String, Object>> simulateLogListToday(@RequestBody Query<Map<String, Object>> query);

    @RequestMapping(value = "/api/stock/simulate/log/list", method = RequestMethod.POST)
    View<Map<String, Object>> simulateLogList(@RequestBody Query<Map<String, Object>> query);

    @RequestMapping(value = "/api/stock/simulate/getOne", method = RequestMethod.POST)
    View<Map<String, Object>> simulateGetOne(@RequestBody Map<String, Object> marketBean);

    /**
     * 搜索
     */
    @RequestMapping(value = "/api/stock/common/search", method = RequestMethod.POST)
    View commonSearchKey(@RequestBody Map<String, Object> searchBean);

    /**
     * 自选
     */
    @RequestMapping(value = "/api/stock/choose/index", method = RequestMethod.POST)
    View<Map<String, Object>> chooseIndex(@RequestBody Query<Map<String, Object>> query);

    @RequestMapping(value = "/api/stock/choose/add", method = RequestMethod.POST)
    View chooseAdd(@RequestBody Map<String, Object> stockChoose);

    @RequestMapping(value = "/api/stock/choose/delete", method = RequestMethod.POST)
    View chooseDelete(@RequestBody Map<String, Object> stockChoose);

    @RequestMapping(value = "/api/stock/choose/check", method = RequestMethod.POST)
    View chooseCheck(@RequestBody Map<String, Object> stockChoose);
}
